package com.itheima.methodDemo;

public class methodDemo5 {
    public static void main(String[] args) {
        //带返回值的方法
        //1.直接调用,没有结果
        getSum(10,20,30);
        //2.赋值调用
        int sum = getSum(1,2,3);
        System.out.println(sum);
        //3.输出调用
        System.out.println(getSum(10,20,30));
    }

    public static int getSum(int num1,int num2,int num3){
        int result = num1+num2+num3;
        return result;
    }
}
